package sys_enum

// 系统管理字典

// 系统-API类型
type sysAPIPermissionType int

var SysAPIPermissionType sysAPIPermissionType

// HTTP请求
func (c *sysAPIPermissionType) HTTP() int {
	return 1
}

// GQL请求
func (c *sysAPIPermissionType) Gql() int {
	return 2
}

func (c *sysAPIPermissionType) ToText(value int) string {
	switch value {

	case 1:
		return "HTTP请求"

	case 2:
		return "GQL请求"

	}
	return ""
}

func (c *sysAPIPermissionType) ToValue(text string) int {
	switch text {

	case "HTTP请求":
		return 1

	case "GQL请求":
		return 2

	}
	return 0
}
